package com.wuji.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.wuji.dao.PersonDao;
import com.wuji.entity.Person;

@Controller
@RequestMapping("/person")
public class PersonController {

	@Resource
	private PersonDao personDao;

	@RequestMapping("/findPerson.do")
	public String find(Model model) {
		List<Person> persons = personDao.findAll();
		model.addAttribute("persons",persons);
		return "person/person_list";
	}
}
